﻿using Agathas.Storefront.Infrastructure.Domain;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Headlight.Model
{
	public class Quote : IAggregateRoot
	{
        [HiddenInput(DisplayValue = false)]
        public int QuoteID { get; set; }

		[Required(ErrorMessage = "Please answer DUI question")]
		public bool IsDUI { get; set; }

		[Required(ErrorMessage = "Please specify if you are currently")]
		public bool IsInsured { get; set; }
		
		[Required(ErrorMessage = "Please enter your zip code")]
		[RegularExpression(@"\d{5}(-\d{4})?", ErrorMessage = "Invalid Zip Code. Must have 5 digits")]
		public string ZipCode { get; set; }

        [HiddenInput(DisplayValue = false)]
        public string IP { get; set; }

        [HiddenInput(DisplayValue = false)]
        public DateTime DateCreated { get; set; }

        [HiddenInput(DisplayValue = false)]
        public DateTime DateSubmitted { get; set; }

        // Navigation properties
        public virtual ICollection<Vehicle> Vehicles { get; private set; }
        public virtual Policy Policy { get; set; }
        public virtual ICollection<Driver> Drivers { get; private set; }
        public virtual Contact Contact { get; set; }
	}
}